return {
  {
    "AstroNvim/astrocore",
    ---@type AstroCoreOpts
    opts = function(_, opts)
      local opt = require("astrocore").extend_tbl(opts, {
        options = {
          -- first key is the type of option `vim.<first_key>`
          opt = {
            relativenumber = true, -- sets `vim.opt.relativenumber`
            -- signcolumn = "auto", -- sets `vim.opt.relativenumber`
            number = false,
            -- spellfile = vim.fn.stdpath "config" .. "/lua/user/spell/en.utf8.add",
            -- thesaurus = vim.fn.stdpath "config" .. "/lua/user/spell/mthesaur.txt",
            -- helplang = "cn",
            paste = false,
            scrolloff = 5,
            -- scrolloff = math.floor((win_height - 1) / 2),
            -- sidescrolloff = math.floor((win_height - 1) / 2),
          },
          g = {
            transparent_background = true,
            icons_enabled = true,
            -- set global `vim.g` settings here
          },
        },
        diagnostics = {
          update_in_insert = false,
          underline = true,
          virtual_text = {
            spacing = 5,
            severity_limit = "WARN",
            severity = {
              min = vim.diagnostic.severity.INFO,
            },
          },
          signs = {
            severity = {
              min = vim.diagnostic.severity.INFO,
            },
          },
        },
      })
      local maps = opts.mappings
      local astro = require "astrocore"
      maps.n["<Leader>t"] = vim.tbl_get(opts, "_map_sections", "t")
      if vim.fn.executable "git" == 1 and vim.fn.executable "lazygit" == 1 then
        maps.n["<Leader>g"] = vim.tbl_get(opts, "_map_sections", "g")
        local lazygit = {
          callback = function()
            vim.cmd [[ wall]]
            local worktree = astro.file_worktree()
            local flags = worktree and (" --work-tree=%s --git-dir=%s"):format(worktree.toplevel, worktree.gitdir) or ""
            astro.toggle_term_cmd { cmd = "lazygit " .. flags, direction = "float" }
          end,
          desc = "ToggleTerm lazygit",
        }
        maps.n["<Leader>gg"] = { lazygit.callback, desc = lazygit.desc }
        maps.n["<Leader>tl"] = { lazygit.callback, desc = lazygit.desc }
      end
      return opt
    end,
  },
}
